height
Type
property
Summary
Specifies the distance from an object's top edge to its bottom edge.
Syntax
set the height of <object> to <numberOfPixels>
Description
Use the height property to determine how much vertical space an object needs, or to make it taller or shorter.
If an object's lockLocation property is false, when you change its height, it shrinks or grows from the center. The object's top and bottom edges both shift, while the object's location property stays the same. If the object's lockLocation property is true, it shrinks or grows from the top left corner: the object's top edge stays in the same place, and the bottom edge moves.
If you reduce the height of a stack, some objects may end up outside the stack window. These objects are not shown; however, they are still there, and will be displayed if you make the window tall enough.
The height of an object cannot be set to zero. Attempting to do so will set the height to 1 instead.
On Mac OS and OS X systems, the menu bar normally appears at the top of the screen, rather than inside the stack window. If a stack contains a menu bar and the stack's editMenus property is set to false, the stack window is automatically resized so that the menu bar group is not visible in the window. In this case, the height of the stack is the current height of the stack window, but the height of the card is the height of the total content area of the stack (including the hidden menu bar group). This is equal to the height of the stack plus its vScroll.
You can set the height of a card, but doing so has no effect and doesn't change the card's height property.
The current architecture uses 16-bit signed integers for all co-ordinates, which means that the value range is -32768 to 32767.
Examples
put the height of button 1 + the height of button 2 into requiredHeight
set the height of field thisField to the textHeight of thisField
Related
command: revChangeWindowSize, group
glossary: object, property, Mac OS, menu bar, stack window, OS X
keyword: card
property: backSize, location, orientation, fixedLineHeight, minHeight, scale, bottom, editMenus, lockLocation, vScroll
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile